package com.yanqu.road.server.cmd.wingroom.chakra.cross;

import com.yanqu.road.exception.BusinessException;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.WingRoomChakraProto.WingRoomChakraProto;
import com.yanqu.road.server.GameServer;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.player.GamePlayerMgr;
import com.yanqu.road.server.manger.wingroom.WingRoomChakraMgr;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameProtocol;
import com.yanqu.road.utils.YanQuMessageUtils;
import io.netty.channel.ChannelHandlerContext;

/**
 * @author ：zfr
 * @date ：2022/2/23 14:11
 */
@Cmd(code = GameProtocol.S_CHAKRA_BE_VISIT_FROM_CROSS, desc = "厢房命盘-跨服拜访-拜访返回")
public class CrossChakraBeVisitCmd implements Command {

    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
        WingRoomChakraProto.WingRoomChakraBeVisitFromCrossReqMsg reqMsg =  WingRoomChakraProto.WingRoomChakraBeVisitFromCrossReqMsg.parseFrom(packet.getBytes());
        WingRoomChakraMgr.crossVisitReturnHandle(reqMsg);
    }
}
